#!/bin/bash

cat >> $1 <<EOF
    location /$2 {
        proxy_pass http://$2:$3;
        proxy_set_header Host \$host;
        proxy_set_header X-Real-IP \$remote_addr;
    }

EOF
